Differences to Ruby's HAML
Not enough to worry about: all test cases found in the .json files of the original Ruby distribution pass. The differences are minor and intentional:
- HAML-TO-PHP sets
escape_htmlto true by default - No Ruby code is supported — you mix in PHP code instead
- Because HAML-TO-PHP renders more static content, some very rare specific cases behave differently. For example:
%tag{ "#{foo()}" => "v1", "#{foo()}" => "v2"}Ruby's HAML only keeps one tag if
foo()evaluates to the same value twice. HAML-TO-PHP will render the same tag twice. Fixing this would require evaluating more PHP code per request. If this matters, contact support. - Line continuation (
|) is not yet supported — could be fixed easily (→ contact support) - Markdown support and similar filters are not included yet. You can add your own filters easily.